const { UserProfile } = require('@/models/report');

const getProfiles = async (req, res) => {
    const { user_id } = req.params;
    const profiles = await UserProfile.getProfiles(user_id);
    res.json(profiles);
}
const getStats = async (req, res) => {
    const { user_id } = req.params;
    const stats = await UserProfile.getStats(user_id);
    res.json(stats);
}
const syncProfiles = async (req, res) => {
    const { user_id } = req.params;
    const profile = req.body;
    const stats = await UserProfile.syncProfiles(user_id, profile);
    res.json(stats);
}

module.exports = {
    getProfiles,
    getStats,
    syncProfiles
}